﻿<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
        <meta http-equiv="Expires" content="0">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-control" content="no-cache">
        <meta http-equiv="Cache" content="no-cache">
        <title>授权成功</title>
        <style>
            .content{
                margin:40px;
                text-align:center;
            }
            .icon{
                display:block;
                margin:0 auto;
                width:100px;
            }
            .successTips{
                font-size:18px;
                margin-top:20px;
            }
            .backBtn{
                padding:10px 40px;
                border-radius:50px;
                outline:none;
                border:1px solid #ccc;
                margin-top:10px;
            }
        </style>
    </head>
    <body>       
        <div class="content">
            <img src="~/images/success.png" alt="加载失败" class="icon"/>
            <div style="display:none;" id="wxwebview" class="successTips">授权成功！</div>
            <div style="display:none;" id="wxweb" class="successTips">授权成功！</div>
            <button class="backBtn" onclick="goBack()">返回上一页</button>
        </div>
    </body>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script>
     
    var u = navigator.userAgent;
    if(u.indexOf("miniProgram") != -1){
        //在微信小程序
        document.getElementById("wxwebview").style.display ="block"
    }else {
        //在微信网页
        //打开小程序
        document.getElementById("wxweb").style.display="block"
    }
    window.onload=function(){
        var config = JSON.parse('@ViewBag.jsconfig');
        wx.config(config);
    }
    //返回上一页
    function goBack(){
        wx.miniProgram.navigateBack({

        });
    }
    
</script>
</html>